package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author : Jungle
 * @Description :
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 远程调用的两种表示方法
     * 1.直接调用后台服务@FeignClient("gulimall-product")  /product/skuinfo/info/{skuId}
     * 2.所有的请求调用网关 @FeignClient("gulimall-gateway")  /api/product/skuinfo/info/{skuId}
     *
     * @param skuId
     * @return
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);
}
